package com.woniu.command.orderCommand;

import com.woniu.command.Command;
import com.woniu.command.handle.OrderCommandHandler;
import com.woniu.util.ApplicationContextHolder;
import org.springframework.beans.factory.annotation.Autowired;

public class DeleteOrderCommand implements Command<String,Boolean> {

    @Autowired
    private OrderCommandHandler handler;

    public DeleteOrderCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext().getBean(OrderCommandHandler.class);
    }

    @Override
    public Boolean excute(String orderNo) {
        return this.handler.deleteOrderByorderNo(orderNo);
    }


}
